<?php App::import('Sanitize'); ?>
<div class="breadcrumbs">		
	<?php
	$items = array(
		array('Home', array('controller' => 'pitches', 'action' => 'index')),
		array('Opdrachten', array('controller' => 'pitches', 'action' => 'index')),
		array($this->FixText->fix_text(Sanitize::html($pitch['Pitch']['title']), 15, TRUE), array('controller' => 'pitches', 'action' => 'view', $pitch['Pitch']['id'] ))
	);
	echo $this->Navigation->breadcrumbs($items);
	?>
</div>

<div class="welcome"><h2>Opdracht van</h2><h1><?php echo $this->Html->link(' '.Sanitize::html($pitch['ContractorProfile']['company']), array('controller' => 'contractor_profiles', 'action' => 'view', $pitch['ContractorProfile']['id'])); ?></h1></div>

				<div class="content-wrapper ui-corner-all">				
					<div class="block-white-top ui-corner-tl ui-corner-tr">
					<div class="clear"></div>
						<div class="brief-detail">
							<div class="logo-conttr">
							<div class="design-kader1"> 
								<?php echo $this->Html->link($this->Html->image($pitch['ContractorProfile']['avatar']), array('controller' => 'contractor_profiles', 'action' => 'view', $pitch['ContractorProfile']['id']), array('escape' => false));; ?>
							</div>
							</div>
							<div class="briefing-details">
								<p class="comp-name">Briefing <?php echo Sanitize::html($pitch['Pitch']['title']); ?></p>
								<table>
									<tr><td>Deadline:</td><th><?php echo $this->FixDate->fix_date(Sanitize::html($pitch['Pitch']['deadline'])); ?></th></tr>
									<tr><td>Reward:</td><th><?php echo " " . $this->Number->currency(Sanitize::html($pitch['Pitch']['reward']), 'EUR'); ?></th></tr>
								</table>							
							</div>
						</div>
						<div class="clear"></div>
					</div>
					
					<?php
					$ch = curl_init();
					$link = "http://api.bit.ly/v3/shorten?login=melego&apiKey=R_4968dc793b0d094a01703fb942ba1efb&longUrl="."http://xstoryteller.com".($this->here)."&format=txt";
					curl_setopt($ch, CURLOPT_URL, $link);
					curl_setopt($ch, CURLOPT_HEADER, 0);
					?>
					
					<div class="block-white-content">
						<div class="job-description">
							<h1>Bedrijfsinformatie</h1>							
								<p class="job-desc-main">
								<?php echo Sanitize::html($pitch['ContractorProfile']['company_info']); ?>
								</p>
								<h1>Opdrachtomschrijving</h1>
								<p class="job-desc-main">
								<?php echo Sanitize::html($pitch ['Pitch']['description']); ?>
								</p>
								<h1>Opdracht delen</h1>
								<div class="clear"></div>
								<?php
								$id = $pitch['Pitch']['id'];
								$type = 'opdracht';
								echo $this->Html->link('', array('controller' => 'messages', 'action' => 'send_item',null, $type, $id), array('class' => 'mail-icon'));
								?>
								<a class="linked-icon" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php curl_exec ($ch); ?>&title=<?php echo Sanitize::html($pitch['Pitch']['title']); ?>&summary=Specialist qua <?php echo Sanitize::html($pitch['Pitch']['category']); ?>? Dan kan je nu een zakcentje verdienen!&source=Pitchtree"></a>
								<a class="twitter-icon" href="http://twitter.com/home?status=Specialist qua <?php echo Sanitize::html($pitch['Pitch']['category']); ?>? Dan kan je nu een zakcentje verdienen! <?php curl_exec ($ch); curl_close($ch); ?>%20%23pitchtree"></a>
								<div class="clear"></div>							
						</div>
					</div>
					<div class="block-white-content ui-corner-br ui-corner-bl">
					<div class="clear"></div>
					<div class="block-white-content">
						<div class="button-view-design">
						<?php echo $this->Html->link(__('Bekijk Ontwerpen', true), array('controller' => 'designs', 'action' => 'index', $pitch['Pitch']['id'])); ?>
						</div>
					</div>
					
					<div class="clear"></div>	
					</div>
				</div>
